<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>我的钱包</title>
	<%@include file="/WEB-INF/base/commRoot.jsp"%>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="/css/public.css" type="text/css" rel="stylesheet" />
	<link href="/css/style.css" type="text/css" rel="stylesheet" />
    <link href="/css/account.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/js/rsa/RSA.js"></script> 
	<script type="text/javascript" src="/js/rsa/BigInt.js"></script> 
	<script type="text/javascript" src="/js/rsa/Barrett.js"></script> 
	<script type="text/javascript" src="/js/rsa/RsaDataUtil.js"></script> 
    <script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
    <script type="text/javascript" src="/js/view/account/accountPage.js"></script>
    <script type="text/javascript" src="/js/view/account/sms.js"></script>
    <script type="text/javascript" src="/js/view/account/utils.js"></script>
    
   	<style type="text/css">
    	.account_right .Assets_info .qb_balance .zj_balance span.into {
	    		margin-right: 160px;
			}
    </style>
  </head>
  
  <body>
  <input id="module" type="hidden" value="<s:property value='#application.module'/>">
<input id="empoent" type="hidden" value="<s:property value='#application.empoent'/>">
<!--header-->
<jsp:include page="/head.jsp"></jsp:include>
<!--/header-->
<!--/main-->
<div class="main_bg">
    <div class="main_account clearfix">
    	<!--left-->
    	<jsp:include page="/WEB-INF/view/account/myPurse_left.jsp"></jsp:include>
        <!--right-->            
            <!-- 我的钱包  我的定期计划 start -->
            <!--right-->            
        <div class="account_right r">
        <dl class="zc_tit income_tit clearfix"><dt class="l"><span class="line_a"></span>昨日总收益</dt><dd class="l orange"><b><s:property value="%{formatMoney(countYesterdayProfit)}"/></b>元</dd><dd class="l" style="margin:0 30px;"><a href="<s:url value="/account/yesterProfitDetailAction_findYesterProfitDetail.action"/>" class="blue">查看详情</a></dd><dd class="l" style="color:#00B5AD;">昨日总收益包含惠信钱包、钱包体验金、创业宝、惠卡宝定期计划四项收益</dd></dl>
            <dl class="zc_tit add_line clearfix"><dt class="l"><span class="line_a"></span>钱包概况</dt><dd class="r">年化收益率：<s:property value="%{annualYieldRate(#request.purseSummary.dataValue)}"/>%</dd></dl>
            <div class="balanceNum clearfix">
                <dl class="wid1">
                	<dt>昨日收益：</dt>
                    <dd class="orange"><span><s:property value="%{formatMoney(#request.purseSummary.dayProfit)}" /></span>元</dd>
                </dl> 
                <p class="action_btn wid2 l"><a href="<s:url value="/fundRecord_recharge.action"/>" class="org">充值</a>&nbsp;&nbsp;&nbsp;<a href="<s:url value="/fundRecord_withdraw.action"/>" class="bue">提现</a></p>
                <dl class="wid3">
                	<dt>钱包余额：</dt>
                    <dd><span><s:property value="%{formatMoney(#request.purseSummary.cash)}" /></span>元</dd>
                </dl> 
                <dl class="wid4">
                	<dt>免费提现金额：</dt>
                    <dd class="orange"><span><s:property value="%{formatMoney(#request.purseSummary.freeCanWithdrawCash)}" /></span>元</dd>
                </dl>
                <dl class="wid5">
                	<dt>累计收益：</dt>
                    <dd><span><s:property value="%{formatMoney(#request.purseSummary.profit)}" /></span>元</dd>
                </dl>
                <dl class="wid6">
                	<dt class="clearfix"><span class="l">体验金余额：</span>
                    	<div class="quessd" style="float:left ; margin-top:2px; ">
                            <a href="javascript:void(0);" class="question_mark" ></a>
                            <div>
                                <span class="arrow_grey_top"></span>
                                <p class="bz_arrow_bor">体验金不可提现、支付，可享受<s:property value="tasteCashParam" />天的收益，收益可提现、支付</p>
                            </div>
                        </div>
                    </dt>
                    <dd class="orange"><span><s:property value="%{formatMoney(#request.purseSummary.tasteAccAmount)}" /></span>元</dd>
                </dl>  
            </div>
            <dl class="zc_tit add_line clearfix" style="margin-top:42px;"><dt class="l"><span class="line_a"></span>我的定期计划</dt><dd class="r">年化收益率：<s:property value="%{annualYieldRate(#request.myFixedPlan.dataValue)}"/>%</dd></dl>
            <div class="balanceNum clearfix">
                <dl class="wid1">
                	<dt>昨日收益：</dt>
                    <dd class="orange"><span><s:property value="%{formatMoney(#request.myFixedPlan.dayProfit)}" /></span>元</dd>
                </dl> 
                <p class="action_btn wid2 l"><a href="<s:url value="/account/hkbProjectAipAction_findHkbProjectAll.action"/>" class="org">转入</a>&nbsp;&nbsp;&nbsp;<%-- <a href="<s:url value="/account/aipPlanAction_findByUserAipPlan.action"/>" class="bue">转让</a> --%></p>
                <dl class="wid3">
                	<dt>累计收益：</dt>
                    <dd><span><s:property value="%{formatMoney(#request.myFixedPlan.profit)}" /></span>元</dd>
                </dl> 
                <dl class="wid7">
                	<dt>惠卡宝定期投资金额：</dt>
                    <dd class="orange"><span><s:property value="%{formatMoney(#request.myFixedPlan.cash)}" /></span>元</dd>
                </dl>
            </div>
             <!--tab-->
            <ul id="tab" class="tab_tit_plan">
                <li class="fli"><a href="javascript:void(0);">已经持有</a></li>
                <li><a href="javascript:void(0);">转让记录</a></li>
            </ul>
            <!--con-->
            <div id="tab_con">
           		 <input type="hidden" id="message" name="message" value="<s:property value="message" />"/>
                <!--已经持有-->
                <div class="fdiv dis_no plan_manage_list" id="hkbInvestIterm"></div>
               
            	<!--转让记录-->
            	<div class="dis_no transfer_table">
                	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="transferRecordTable">
                        <thead  id="transferRecordThead">
                          <tr bgcolor="#eeeef4">
                            <th width="15%" height="50" align="left" class="td1">项目名称</th>
                            <th width="11%">日期</th>
                            <th width="11%" align="left">转让金额</th>
                            <th width="11%" align="left">转让价</th>
                            <th width="8%" align="center">转让时长</th>
                            <th width="10%">年化收益率</th>
                            <th width="11%">剩余锁定期</th>
                            <th width="10%" align="left">预计收益</th>
                            <th width="6%">状态</th>
                            <th width="8%">操作</th>
                          </tr>
                        </thead>
                    </table>
                </div>
                <div class="clearfix">
			        <p class="page r">
					<%@include file="/WEB-INF/base/page.jsp"%>
					<input type="hidden" id="pageNo" name="pageNo" value="<s:property value="#page.currentPage"/>" />
					</p>
			    </div>  
            </div>
            <!--/con-->
            <!-- 我的钱包  我的定期计划end   -->
             <div class="hx_center">
                <h2 class="zc_tit"><span class="line_a"></span>惠信金融理财产品</h2>
                <div class="qb_wrap clearfix">                    
                    <div id="logo_huikadai" class="logopop multiplet">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠卡贷<span></span></h3>
                            <p>惠卡贷<a href="http://p2p.365sji.com/" target="_blank" class="blue">(p2p.365sji.com)</a>，结合金融发展与互联网技术创新，致力于为中小型企业、个人、惠卡商家和惠卡会员提供借贷新渠道，更为个人提供投资理财服务。在风险管控体系基础上，为中小企业及个人客户提供投融资服务，实现财富增值，打造一个P2P网络借贷平台。</p>
                        </div>
                    </div>
                    
                    <div id="logo_huikabao" class="logopop multipleo">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠卡宝<span></span></h3>
                            <p>通过惠卡宝投资享受全本息保障，通过惠卡宝<a href="http://hkb.365sji.com/" target="_blank" class="blue">(hkb.365sji.com)</a>投资的对象是惠卡贷针对加盟惠信的商家、会员等小额借款项目，中小商 家企业抵押担保借款项目，惠卡贷团队会对任何借款项目严格把关，层层风控，确保投资人的投资安全，如果惠卡贷借款人出现逾期，惠卡公司将启用风险保障金先行垫付投资人本息。</p>
                        </div>
                    </div>
                    
                    <div id="logo_dianxingbao" class="logopop multiplet three">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">电影宝<span></span></h3>
                            <p>电影宝<a href="http://www.huixinfilm.com/" target="_blank" class="blue">(www.huixinfilm.com)</a>专注于小制作、最贴近生活和心灵的电影，我们力求通过一些平凡人的故事来打动人心，激发生活希望和动力、唤醒人们对美好生活的追求和热情，如创业题材、街头艺术题材、家庭题材、公司题材、生活题材等，协助您实现自己的电影梦想。</p>
                        </div>
                    </div>
                    
                    <div id="logo_huixinjinrong" class="logopop multipleo">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠信金融<span></span></h3>
                            <p>惠信金融<a href="http://www.hkd58.com/" target="_blank" class="blue">(hkd58.com)</a>是惠信旗下的在线金融产品导购和销售平台，基于满足广大互联网用户的理财需求，旨在帮助用户学会理财、成功理财获得收益。惠信金融通过各种通道为金融消费者提供金融产品信息、比较购买推荐、消费决策依据以及直接购买等服务。</p>
                        </div>
                    </div>  
                     <div id="logo_chuangyebao" class="logopop multipleo">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">创业宝<span></span></h3>
                            <p>创业宝<a href="http://cyb.365sji.com/" target="_blank" class="blue">（http://cyb.365sji.com/）</a>是惠信旗下P2P理财产品，年化收益高达16.2%按日结算，还另可享受所投资项目的月度发展红利分红+年度发展红利分红。创业宝所有投资项目皆是深圳惠卡世纪有限公司创新孵化创业项目，发展前景可观，具有巨大的社会价值。</p>
                        </div>
                    </div> 
                       <div id="logo_huixinbao" class="logopop multiplet three">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠信宝<span></span></h3>
                            <p>惠信宝<a href="http://hxb.365sji.com/" target="_blank" class="blue">(http://hxb.365sji.com)</a>是深圳惠卡世纪集团针对惠卡商城事业，惠卡商城分销商、代理商、供应商等量身打造的供应链金融服务平台，分销商代理商供应商等有闲钱可投资申购惠信宝，按天计息并结算收益，年化收益高达16.47%，更重要的事，惠卡商城的广大分销商、代理商、供应商可在惠信宝根据经营惠卡商城事业轻松获得授信额度范围内的信用借款
</p>
                        </div>
                    </div>
                </div>
                <h2 class="zc_tit"><span class="line_a"></span>惠信中心</h2>
                <div class="qb_wrap">
                	<div id="logo_huixin" class="logopop multipleo">
                        <div class="desc">
                        	<div class="closebtn"></div>
                            <h3 class="title">惠信<span>全网最低消费购物中心</span></h3>
                            <p>惠信<a href="http://app.365sji.com/" target="_blank" class="blue">(app.365sji.com)</a>是深圳惠卡世纪有限公司倾力打造的互联网品牌，深圳惠卡世纪有限公司注册资本5000万元，总部在广东深圳，目前在江苏苏州、山东烟台、山东龙口、香港等地设有分公司外，惠卡的目标是在2023年3月前实现世界100强企业的创业梦想。</p>
                        </div>
                    </div>
                    
                    <div id="logo_pingbao" class="logopop multiplet">
                        <div class="desc">
                        	<div class="closebtn"></div>
                            <h3 class="title">拼宝商城<span>全网最低消费购物中心</span></h3>
                            <p>拼宝<a href="http://www.178pb.com/" target="_blank" class="blue">(www.178pb.com)</a>是一个多人参与拼购的消费购物平台，在限定时间内拼购人数越多，享受的折扣就越低。秉承"客户为先"的经营理念，致力于为消费者与供应商提供一个最优质、 便捷的交易平台，打造成中国最受消费者信赖的电子商务网站之一。海量正品，多人参拼，同享更多优惠，共最终价。</p>
                        </div>   
                    </div>
                    
                    <div id="logo_1yuanpingbao" class="logopop multipleo three">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">1元拼宝<span></span></h3>
                            <p>1元拼宝<a href="http://1.178pb.com" target="_blank" class="blue">1.178pb.com</a>作为一个拼宝旗下电子商务平台，保证所有奖品100%原装正品1元拼宝严格控制奖品供应渠道，全部奖品均由入驻拼宝的品牌官方以及品牌经销商等直接供应，同时1元拼宝保证做到绝对公平公正公开透明，保证所有参与1元购的用户行为，都享受同样的权利与义务。</p>
                        </div>
                    </div>
                    
                    <div id="logo_nongcunbao" class="logopop multiplet">
                        <div class="desc">
                        	<div class="closebtn"></div>
                            <h3 class="title">农村宝<span></span></h3>
                            <p>农村宝<a href="http://www.178ncb.com/" target="_blank" class="blue">(178ncb.com)</a>以中国农村产品及资源为主的消费购物平台，目前在建的农村宝贸易中心【贵州.德江】项目于2014年与德江人民政府签约达成合作启动，预计于2015年将在贵州.德江盛大开业</p>
                        </div>
                    </div>
                    
                    <div id="logo_huixintongcheng" class="logopop multipleo">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠信同城<span></span></h3>
                            <p>惠信同城<a href="http://58.365sji.com" target="_blank" class="blue">(58.365sji.com)</a>是惠信旗下的生活分类信息网站，本地化、自主且免费、真实高效是惠信同城的三大特色，旨在帮助人们解决生活和工作所遇到的难题。其服务覆盖生活的各个领域，海量生活信息免费发布查询，提供多种生活信息，覆盖中国所有大中城市。</p>
                        </div>
                    </div>
                    
                    <div id="logo_huixinshangjia" class="logopop multiplet three">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠信商家<span></span></h3>
                            <p>惠信商家城<a href="http://sj.365sji.com/" target="_blank" class="blue">(sj.365sji.com)</a>一直致力于城市消费体验的沟通和聚合。<br/>
在这里，所有的信息都来源于大众，服务于大众。<br/>
在这里，每个人都可以自由发表对商家的评论，好则誉之，差则贬之。<br/>
在这里，每个人都可以向大家分享自己的消费心得，同时分享大家集体的智慧。
</p>
                        </div>
                    </div>
                    
                    <div id="logo_huixindaohang" class="logopop multipleo">
                        <div class="desc"><div class="closebtn"></div>
                            <h3 class="title">惠信导航<span></span></h3>
                            <p>惠信导航<a href="http://hao.365sji.com/" target="_blank" class="blue">(hao.365sji.com)</a>是一款快速、功能强大的多窗口上网导航， 它是完全免费为上网用户提供搜索、热门网站、天气、股票、彩票、航班、路况、公交等上网常用服务的实用工具，可以在这里阅读资讯、读小说、看视频、上微博、玩游戏、网上购物，找新闻等都能享受最流畅的移动互联网体验。轻松上网，便捷生活，从hao.365sji.com开始！
</p>
                        </div>
                    </div>
                    <div id="logo_huikashangchen" class="logopop multiplet">
                        <div class="desc">
                        	<div class="closebtn"></div>
                            <h3 class="title">惠卡商城<span></span></h3>
                             <p>惠卡商城<a href="http://www.huikamall.com/" target="_blank" class="blue">(huikamall.com)</a>隶属于深圳惠卡世纪有限公司，公司注册资本5千万元，总部在广东深圳，目前在上海、北京、江苏苏州、山东烟台、山东龙口、贵州德江、香港、泰国、美国等地设有分公司或子公司、关联公司，惠卡的目标是在2023年3月前实现世界100强企业的创业梦想</p>
                        </div>
                    </div>
                    
                    
                    
                    
                </div>
               
            </div>
        </div>
    </div>
</div>
<!--footer-->
<jsp:include page="/footer.jsp"></jsp:include>
<%-- <div id="changeHkb" class="popup dis_no" style=" width:600px; margin-left:-245px; top:3%;" onMouseDown="moveEvent(event,this.id)">
	<h3><span>转让惠卡宝定期计划</span><a href="javascript:void(0);" class="close"></a></h3>
    <div class="pop_hkb_plan pop_transfer">
    	<p style="padding:16px 0 8px 34px;" id="aipTitle"></p>
        <ul class="clearfix">
            <li class="l" style=" width:60%;"><label class="tit">定投编号：</label><span class="l" id="orderNo"></span><input type="hidden" id="hkbInvestId"/></li>
            <li class="l" style=" width:40%;"><label class="tit">年化收益率：</label><span class="orange l" id="profitRate">0</span><span>%</span></li>
        </ul>
        <ul class="clearfix">
            <li class="l"><label class="tit">持有金额：</label><span class="orange l" id="holdMoney">0</span><span>元</span></li>
            <li class="l"><label class="tit">剩余锁定期：</label><span class="l" id="term">0</span><span>天</span></li>
            <li class="l"><label class="tit">预计收益：</label><span class="l" id="anticipatedRevenue">0</span><span>元</span></li>
        </ul>
        <ul class="clearfix">
            <li><label class="tit">可转让本金：</label><span class="l" id="sureMoney">0</span><span>元</span></li>
        </ul>
        <div class="clearfix" style=" width:100%; height: 62px;"><label class="tit">转让时长：</label><div class="l"><div class="clearfix"><input id="theTerm" class="input l v" type="text" onfocus="focusCheck('theTermCheck')" onblur="blurCheck(0)" name=""><span class="tips l v">最长有效期<span id="cancelDate"><s:property value="systemMap['1052'].dataValue"/></span>天,过期自动取消</span></div><p id="theTermCheck"></p></div></div>
        <div class="clearfix" style="height:62px;"><label class="tit" style="line-height:38px;">转让本金：</label><div class="l"><div class="clearfix"><input name="" id="intoMoney" type="text" class="input l v" onblur="blurCheck(1)" onfocus="focusCheck('intoMoneyCheck')"><p class="tips l v">转让本金必须大于<span id="minMoney">0</span>元<br/></p></div><p id="intoMoneyCheck"></p></div>
        
        </div>
        <div class="clearfix" style="height:62px;"><label class="tit" style="line-height:38px;">转让价：</label><div class="l"><input name="" type="text" class="input v" id="transferPrice" onblur="blurCheck(1)" onfocus="focusCheck('transferPriceCheck')"><p class="tips v" style=" +display:inline;">浮动<em id="dataValue"><s:property value="systemMap['1051'].dataValue"/></em>%以内</p><p  id="transferPriceCheck"></p></div></div>
        <ul><li class="clearfix"><label class="tit">成交后手续费：</label><span class="l"><s:property value="systemMap['1053'].dataValue"/>%×转让本金</span></li></ul>
         <ul><li class="clearfix" style="height:62px; padding-top:8px;"><label class="tit" style="line-height:38px;">支付密码：</label><div class="l"><input name="" id="payPwd" type="password" class="input" onblur="blurCheck(2)" onfocus="focusCheck('payPwdCheck')"><p  id="payPwdCheck"></p></div></li></ul>
         <ul><li class="clearfix agree"><input name="agreement" checked="checked" type="checkbox" value="" class="l mar_li" id="agreeOffer" style="margin-left:108px;"><label for="agree">我已阅读并同意<a href="${root}/staticAction_hkbRegularAgreement.action" target="_blank" class="blue">《惠卡宝定期计划服务协议》</a></label></li></ul>
    </div>
    <div class="popup_bottom"><a href="javascript:saveHkbProjectdefTransfer();" class="btn" id="commitOffer">确认转让</a></div>
</div>
<div class="pop_up_bg dis_no"></div> --%>


<!--popup-->

<div class="popup dis_no" style=" width:600px; margin-left:-300px; top:5%;"  id="changeHkb"  onMouseDown="moveEvent(event,this.id)">
	<h3><span>转让定期计划</span><a href="javascript:void(0);" class="close"></a></h3>
    <div class="pop_hkb_plan pop_transfer pop_two_mod">
    	<!--<p style="padding:16px 0 8px 34px;"></p>-->
        <ul class="clearfix" style="padding-top:14px;">
            <li class="l" id="aipTitle"></li> 
            <li class="r"><label class="tit">订单编号：</label><span class="l" id="orderNo"></span><input type="hidden" id="hkbInvestId"/></li>
        </ul>
        <ul class="clearfix">
            <li class="l" style="width:38%;"><label class="tit">持有金额：</label><span class="orange l" id="holdMoney">0</span><span>元</span></li>
            <li class="l" style="width:36%;"><label class="tit">剩余锁定期：</label><span class="orange l" id="term">0</span><span>天</span></li>
            <li class="l" style="width:26%;"><label class="tit">年化收益率：</label><span class="orange l" id="profitRate">0</span><span>%</span></li>
        </ul>
        <ul class="clearfix"> 
            <li class="l" style="width:38%;"><label class="tit">可转让本金：</label><span class="orange l" id="sureMoney">0</span><span>元</span></li>
            <li class="l" style="width:36%;"><label class="tit">预计收益：</label><span class="orange l" id="anticipatedRevenue">0</span><span>元</span></li>
        </ul>

        <div class="clearfix" style="height:62px; padding-top:16px;"><label class="tit" style="line-height:38px;">转让时长：</label><div class="l"><input name="" type="text" class="input v" id="theTerm" onfocus="focusCheck('theTermCheck')" onblur="blurCheck(0)"><p class="tips v" style=" +display:inline;">最长有效期<span id="cancelDate"><s:property value="systemMap['1052'].dataValue"/></span>天，过期自动取消</p><p class="suc_tips" id="theTermCheck"></p></div></div>
        <div class="clearfix" style="height:62px;"><label class="tit" style="line-height:38px;">转让本金：</label><div class="l"><input name="" type="text" class="input v" id="intoMoney" onblur="blurCheck(1)" onfocus="focusCheck('intoMoneyCheck')"><p class="tips v" style=" +display:inline;">转让本金必须大于等于<span id="minMoney">0</span>元<br/></p><p class="suc_tips" id="intoMoneyCheck"></p></div></div>
        <div class="clearfix" style="height:62px;"><label class="tit" style="line-height:38px;">转让价：</label><div class="l"><input name="" type="text" class="input v" id="transferPrice" onblur="blurCheck(1)" onfocus="focusCheck('transferPriceCheck')"><p class="tips v" style=" +display:inline;">浮动<em id="dataValue"><s:property value="systemMap['1051'].dataValue"/></em>%以内</p><p class="suc_tips" id="transferPriceCheck"></p></div></div>
        <p class="clearfix"><label class="l" style=" line-height:30px;">成交后手续费：</label><span class="l transferRate"><s:property value="systemMap['1053'].dataValue"/>%×转让本金</span></p>
        <p class="transferReminderMessage" style="color:#f40; font-size:13px; padding:12px 0;">正在获取转让定投计划提示信息...</p>
        <ul style="height:62px; padding-top:8px;"><li class="clearfix"><label class="tit" style="line-height:38px;">支付密码：</label><div class="l"><input name="" class="input" id="payPwd" type="password" onblur="blurCheck(2)" onfocus="focusCheck('payPwdCheck')"  onpaste="return false"><!--<p class="suc_tips"></p>--><p  id="payPwdCheck"></p></div></li></ul>
        <ul><li class="clearfix agree"><input name="agreement"  checked="checked" type="checkbox" value="" class="l mar_li" id="agreeOffer" style="margin-left:108px;"><label for="agree">我已阅读并同意<a href="${root}/staticAction_hkbRegularAgreement.action" target="_blank" class="blue">《惠卡宝定期计划服务协议》</a></label></li></ul>
    </div>
    <div class="popup_bottom"><a href="javascript:saveHkbProjectdefTransfer();" class="btn" id="commitOffer">确认转让</a></div>
</div>
<div class="pop_up_bg dis_no"></div>

<!--popup-->

</body>
<script type="text/javascript">
$(document).ready(function() {	
	$('.quessd').hover(function() {
		$('div', this).slideDown(200);
		$(this).children('a:first').addClass("hov");
	}, function() {
		$('div', this).slideUp(100);
		$(this).children('a:first').removeClass("hov");		
	});
});
</script>
<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
	    $(document).ready(function () {
	        $(".logo_grid").click(function () {
	            $(this).toggleClass("act").find(".desc").toggle();
	        });
	    });
    </script>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script>
			$.fn.scrollToV = function( target, options, callback ){
			  if(typeof options == 'function' && arguments.length == 2){ callback = options; options = target; }
			  var settings = $.extend({
			    scrollTarget  : target,
			    offsetTop     : 50,
			    duration      : 500,
			    easing        : 'swing'
			  }, options);
			  return this.each(function(){
			    var scrollPane = $(this);
			    var scrollTarget = (typeof settings.scrollTarget == "number") ? settings.scrollTarget : $(settings.scrollTarget);
			    var scrollY = (typeof scrollTarget == "number") ? scrollTarget : scrollTarget.offset().top + scrollPane.scrollTop() - parseInt(settings.offsetTop);
			    scrollPane.animate({scrollTop : scrollY }, parseInt(settings.duration), settings.easing, function(){
			      if (typeof callback == 'function') { callback.call(this); }
			    });
			  });
			}
			
			
			function initOfferingText(){
				$('.selectWrapper .defaultText').click(function(e){
					e.stopPropagation();
					$('#offering').trigger('click.easyDropDown');
				});
			}
			
			
			function initlogopop(){
				var speed = 20;
				$('.logopop .desc').prepend('<div class="closeBtn"></div>');
				$('.logopop').each(function(index){
					var wrapperHeight = $(this).find(".captionWrapper").height();
					var captionHeight = $(this).find(".caption").height();
					$(this).find(".caption").css("margin-top",((wrapperHeight-captionHeight)/2)+"px");
					/* */		
					
					if (index%2==0)
						$(this).addClass("multipleo");
					else
						$(this).addClass("multiplet");
				});
				$('.logopop').click(function(){
					var desc = $(this).find(".desc");
					if(desc.css("display")=="none"){
						$('.desc').fadeOut(speed);
						desc.fadeIn(speed);
						if($(window).width()>980)
							$('html').scrollToV(desc.offset().top-163);
						else
							setTimeout(function(){$('html, body').scrollToV(desc.offset().top-64);},500);
						$('.logopop').removeClass("active");
						$(this).addClass("active");			
					}else{
						desc.fadeOut(speed);
						$(this).removeClass("active");
					}
				});	
			}
			
			$(function(){
				initOfferingText();
				initlogopop();	
				
				toAccountPage(1,1);
				toAccountPage(1,2);
			});

	
		function toAccountPage(pageNo,type){
			if(type==1){
				$.ajax({
		            type: "POST",
		            url:'<s:url value="/account/aipPlanAction_findByUserItem.action"/>',
		            data: {pageNo:pageNo},
		            dataType: "json",
	             	success: function(data){
	             	$("#hkbInvestIterm").html("");
             	 	var itemStr="";
             	 	for (var i = 0; i < data.records.length; i++) {
             	 		//剩余锁定期，如果少于0，则直接显示0即可  add by wujun 20150304
             	 		var surplusTime = differDays(toDate(data.records[i].maturityTime,"yyyy/MM/dd"));
             	 		if(null == surplusTime ||  0 > surplusTime)
             	 		{
             	 			surplusTime = 0;
             	 		}
             	 		if(data.records[i].surplusDays==null || data.records[i].surplusDays=="" || data.records[i].surplusDays < 0){
             	 			data.records[i].surplusDays=0;
             	 		}
             	 		itemStr+="<dl class='clearfix'>"
                            +"<dt><span class='month' title='"+data.records[i].proTitle+"'>"+data.records[i].proTitle+"<input  name='transferDays' type='hidden' value='"+data.records[i].transferDays+"'/></span>   <span class='time'>买入时间："+toDate(data.records[i].investedTime,"yyyy-MM-dd hh:mm")+"</span>    <span class='order'>订单编号：<em>"+data.records[i].orderNo+"</em></span></dt>"
                            +"<dd class='l dd1'>持有金额<br/><span>"+data.records[i].effectAmount.toFixed(2)+"</span>&nbsp;<em>元</em></dd>"
                            +"<dd class='l dd2'>年化收益率<br/><span class='orange'>"+(data.records[i].hkbProfitRate*360).toFixed(2)+"</span><em class='orange'>%</em></dd>"
                            +"<dd class='l dd3'>每万元每日收益<br/><span>"+(data.records[i].hkbProfitRate*100).toFixed(2)+"</span>&nbsp;<em>元</em></dd>"
                            +"<dd class='l dd4'>剩余锁定期<br/><span>"+data.records[i].surplusDays+"</span>&nbsp;<em>天</em></dd>"
                            +"<dd class='l dd5'>累计收益<br/><span>"+data.records[i].profitAccumulate.toFixed(2)+"</span>&nbsp;<em>元</em></dd><dd class='l dd6'>";
                            if(data.records[i].bargainoringTimes >= '<s:property value="systemMap['1054'].dataValue"/>'){
                            	itemStr+="<b class='b_text'>停止转让</b>";
                            }else if((data.records[i].status>=3 && data.records[i].status<=5)){
                            	itemStr+="<b class='b_text'>已结束</b>";
                            }else if(data.records[i].surplusDays<='<s:property value="systemMap['1055'].dataValue"/>'){
                            	itemStr+="<b class='b_text'>停止转让</b>";
                            }else if((data.records[i].effectAmount-data.records[i].bargainoringAmount)<=0){
                            	itemStr+="<b class='b_text'>停止转让</b>";
                            }else{
                            	itemStr+="<a href='javascript:void(0);' class='btn_take_s'>转让</a>";
                            }
                            itemStr+="<input  id='hkbDefId' type='hidden' value='"+data.records[i].id+"'/><input  id='hkbAmount' type='hidden' value='"+data.records[i].bargainoringAmount+"'/><input  id='singleInvestAmountLow' type='hidden' value='"+data.records[i].singleInvestAmountLow+"'/></dd></dl>";
					}
					itemStr+=linkedPageTwo(data.totalPage,data.currentPage,type);
					$("#hkbInvestIterm").append(itemStr);
                 }
         		});
			}else if(type==2){
				$.ajax({
		             type: "POST",
		             url:'<s:url value="/account/aipPlanAction_findByuserHkbProjcetDefTransfer.action"/>',
		             data: {pageNo:pageNo},
		             dataType: "json",
	             	 success: function(data){
	             		$("#transferRecordThead").next().remove();
	                 	$("#transferRecordTable").next().remove();
	             		 var itemStr="";
	                 	for (var i = 0; i < data.records.length; i++) {
	                 		var color="";
	                 	 	if((i+1)%2==0){
	                 	 		color="class='text_wh'  bgcolor='#f5f5f5'";
	                 	 	}else{
	                 	 		//color="bgcolor=#f0f0f0";
	                 	 	}
	                 	 	var surplusTime = differDays(toDate(data.records[i].maturityTime,"yyyy/MM/dd"));
	             	 		if(null == surplusTime ||  0 > surplusTime)
	             	 		{
	             	 			surplusTime = 0;
	             	 		}
	             	 		if(data.records[i].surplusDays==null || data.records[i].surplusDays=="" || data.records[i].surplusDays < 0){
	             	 			data.records[i].surplusDays=0;
	             	 		}
	             	 		var yearProfit = (data.records[i].hkbProfitRate*360).toFixed(2);
// 	             	 		var countProft =(data.records[i].hkbProfitRate/100*data.records[i].investAmount*((data.records[i].surplusDays>0 ? data.records[i].surplusDays-1 : 0))+(data.records[i].investAmount-data.records[i].bargainReceiptPrice))+"";
// 	                 		var countProft = data.records[i].expectedProfit+"";
	                 		itemStr +="<tr "+color+" height='48'><td align='left' class='td1'>"+data.records[i].proTitle+"</td>"
// 	                 		+"<td align='center'>"+data.records[i].orderNo+"</td>"
	                 		+"<td align='center'>"+toDate(data.records[i].bargainorApplyTime,"yyyy-MM-dd hh:mm:ss")+"</td><td align='left'>"+milliFormat((data.records[i].investAmount).toFixed(2))+"元</td><td align='left'>"+milliFormat((data.records[i].bargainReceiptPrice).toFixed(2))+"元</td>"
	                 		if(data.records[i].status>=1 && data.records[i].status<=5 || data.records[i].status>10){
	                 			itemStr +="<td align='center'>已过期</td>";
	                 		}else{
	                 			itemStr +="<td align='center'>"+data.records[i].surplusTranfApplayDays+"</td>";
	                 		}
	                 		itemStr +="<td align='center'>"+yearProfit+"%</td><td align='center'>"+data.records[i].surplusDays+"天</td><td>"+subNumber(data.records[i].expectedProfit,2)+"元</td>";
	                 		if(data.records[i].status>=1 && data.records[i].status<=5){
	                 			itemStr +="<td align='center'>成功</td><td align='center'>已关闭</td></tr>";
	                 		}else if(data.records[i].status==10){
	                 			itemStr +="<td align='center'>转让中</td><td align='center' class='orange'><a style='color:orange' href='javascript:cancelTransfer("+data.records[i].id+","+data.currentPage+")'>取消</a></td></tr>";
	                 		}else if(data.records[i].status>10){
	                 			itemStr +="<td align='center'>失败</td><td align='center'>已关闭</td></tr>";
	                 		}
						}
	                 	$("#transferRecordTable").append(itemStr);
	                 	$("#transferRecordTable").after(linkedPageTwo(data.totalPage,data.currentPage,type));
	             	 }
	         		});
				}
			}
			
		function cancelTransfer(hkbInvestId,pageNo){
			if (this.ajaxRequest_ != undefined && this.ajaxRequest_.readyState < 4) {
		        return;
			}else{
				this.ajaxRequest_=$.ajax({
	            type: "POST",
	            url:'<s:url value="/account/aipPlanAction_cancelHkbProjectDef.action"/>',
	            data: {hkbInvestId:hkbInvestId},
	            dataType: "json",
	        	 success: function(data){
	        		 if(data.msg=="success"){
	        			 layer.alert("操作成功!",9);
	        		 }else if(data.msg=="error"){
	        			 layer.alert("操作失败!",8);
	        		 }else{
	        			 layer.alert(data.msg,8);
	        		 }
	        		 toAccountPage(pageNo,2);
        			 toAccountPage(1,1);
	             }
	    		});
			}
		}
	
		function differDays(obj){
			var date;
			if(obj==null){
				 date = new Date();
			}else{
				 date = new Date(obj);
			}
			
			var now = new Date();
			var days = date.getTime() - now.getTime();
			var time = Math.ceil(days / (1000 * 60 * 60 * 24));
			return time;
		}
		
	   function toDate(obj,formatStr){
			 var date = new Date();
			 date.setTime(obj.time);
			 date.setHours(obj.hours);
			 date.setMinutes(obj.minutes);
			 date.setSeconds(obj.seconds);
			 return date.format(formatStr); 
		}
		
	  function milliFormat(s){//添加千位符  
		    if(/[^0-9\.]/.test(s)) return "invalid value";  
		    s=s.replace(/^(\d*)$/,"$1.");  
		    s=(s+"00").replace(/(\d*\.\d\d)\d*/,"$1");  
		    s=s.replace(".",",");  
		    var re=/(\d)(\d{3},)/;  
		    while(re.test(s)){  
		        s=s.replace(re,"$1,$2");  
		    }  
		    s=s.replace(/,(\d\d)$/,".$1");  
		    return s.replace(/^\./,"0.")  
		}  
		
		$(function(){
			$('#tab li').click(function(){
				var i = $(this).index();
				$('#tab li').removeClass('fli').eq(i).addClass('fli');
				$('#tab_con > div').removeClass('fdiv').eq(i).addClass('fdiv');
			});
	
			$(document).on('click','.btn_take_s',function(){
			    var TransferReminderMessage = parseInt($("#message").val()==null?0:$("#message").val());
			    var buyingTime = parseInt($(this).parent().siblings("dt").children("span.month").children("input").val()==null?0:$(this).parent().siblings("dt").children("span.month").children("input").val());
				if(buyingTime < TransferReminderMessage){					
					layer.alert("为了防止盗卡行为，惠卡宝定期计划买入后"+TransferReminderMessage+"天内不可转让，给您造成的不便，敬请谅解",8);
					return;
				}
				var flag = userInfoCheck();
				if(flag){
					$("#aipTitle").html($(this).parent().siblings("dt").children("span.month").html());
					$("#orderNo").html($(this).parent().siblings("dt").children("span.order").children("em").html());
					$("#term").html($(this).parent().siblings("dd.dd4").children("span").html());
					$("#profitRate").html($(this).parent().siblings("dd.dd2").children("span.orange").html());
					$("#anticipatedRevenue").html(($(this).parent().siblings("dd.dd2").children("span.orange").html().replace(/,/g,"")/360/100*$(this).parent().siblings("dd.dd1").children("span").html()*($(this).parent().siblings("dd.dd4").children("span").html()-1)).toFixed(2));
				    $("#holdMoney").html($(this).parent().siblings("dd.dd1").children("span").html());
				    $("#hkbInvestId").val($(this).siblings("#hkbDefId").val());
				    if($(this).siblings("#singleInvestAmountLow").val()==null || $(this).siblings("#singleInvestAmountLow").val()=="" || $(this).siblings("#singleInvestAmountLow").val() <0){
				    	$("#minMoney").html(1);
				    }else{
				    	$("#minMoney").html($(this).siblings("#singleInvestAmountLow").val());
				    }
				    $("#sureMoney").html(($(this).parent().siblings("dd.dd1").children("span").html()-$(this).siblings("#hkbAmount").val()).toFixed(2));
				    $("#intoMoney").val("");
				    $("#payPwd").val("");
					$("#transferPrice").val("");
					$("#intoMoneyCheck").removeAttr("class").html("");
					$("#theTermCheck").removeAttr("class").html("");
					$("#transferPriceCheck").removeAttr("class").html("");
					$("#payPwdCheck").removeAttr("class").html("");
					$("#theTerm").val("");
					
					var ii = layer.load('提交中...');					
					//获取转让定投计划提示信息
					$.ajax({
						url: ctx_root+"/account/assetListAction_getTransferReminderMessage.action",
						type:"POST",
						data:{"hkbInvestId" : $(this).siblings("#hkbDefId").val()},
						dataType : 'json',
						success:function(data){
							layer.close(ii);
							var json = eval(data);									
							$.each(json, function (index) { 
								  var message = json[index].TransferReminderMessage;
								  var errorMsg = json[index].errorMsg;
								  var transferRate = json[index].TransferRate;
								  
								  var transferReminderMessage, transferRateTxt;								  
								  if(message != null && typeof(message) != "undefined"){
									transferReminderMessage = message;
								  }
								  
								  if(errorMsg != null && typeof(errorMsg) != "undefined"){
									layer.alert(errorMsg, 8);
									return;
								  }
								  
								  if(transferRate != null && typeof(transferRate) != "undefined"){
									transferRateTxt = transferRate;
								  }
								  
								  $(".transferRate").text(transferRateTxt + "%×转让本金"); 
								  $(".transferReminderMessage").text(transferReminderMessage); 
								  
								  $('.popup').show();
								  $('.pop_up_bg').show();
							});
						}
					});
				}
			});
			
			$(document).on('click','.close', function(){
				$('.popup').hide();
				$('.pop_up_bg').hide();
			});
	   });
	   
	   $(function(){
			$("#agreeOffer").click(function(){
				if($(this).is(':checked')){
					$("#commitOffer").css("background","none repeat scroll 0 0 #f40");
					$("#commitOffer").attr("href","javascript:saveHkbProjectdefTransfer();");
				}else{
					$("#commitOffer").css("background","none repeat scroll 0 0 gray");
					$("#commitOffer").removeAttr("href");
				}
			})
		})
		
		function focusCheck(obj){
			$("#changeHkb").removeAttr("onMouseDown");
			$("#"+obj).removeAttr("class").html("")
		}
		
		
		function userInfoCheck(){
			var flag = true;
			var beforStr="投资惠卡宝定期计划，需要先进行实名认证，手机绑定，支付密码设置。您的";
			var afterStr="未设置。单击确定到用户安全中心进行设置。";
			var i=0;
			if('<s:property value="#session.User_session_info.idcard"/>'=="" || '<s:property value="#session.User_session_info.realName"/>'==""){
				if(i==0){
					beforStr+="实名";
				}else{
					beforStr+="，实名";
				}
				i++;
				flag=false;
			}
			if('<s:property value="#session.User_session_info.mobile"/>'==""){
				if(i==0){
					beforStr+="手机";
				}else{
					beforStr+="，手机";
				}
				i++;
				flag=false;
			}
			if('<s:property value="#session.User_session_info.payPwd"/>'==""){
				if(i==0){
					beforStr+="支付密码";
				}else{
					beforStr+="，支付密码";
				}
				i++;
				flag=false;
			}
			if(!flag){
				layer.alert(beforStr+afterStr,8,function(){
					window.location='<s:url value="/account/safeAction_safe.action"/>';
				});
				
			}
			return flag;
		}
		
		function blurCheck(i){
			removeEvent();
			var intoMoney = $("#intoMoney").val().replace(/\s/g, "");
			var dataValue =$("#dataValue").html();
			var transferPrice=$("#transferPrice").val().replace(/\s/g, "");
			var sureMoney =$("#sureMoney").html();
			var minMoney =$("#minMoney").html();
			var floatMoney	=intoMoney*(dataValue/100);
			var theTerm = $("#theTerm").val();
			var cancelDate =$("#cancelDate").html();
		// 	var re = /^\d+(\.\d+)?$/;
		// 	var re = /^[1-9]+[0-9]+(.[0-9]{1,2})?$/;
		var re = /^([1-9]\d*|0)(?:\.\d{1,2})?$/; 
			var termRe = /^[1-9]+[0-9]*]*$/;
			var flag =true; 
			if(i==0 || i>10){
				if(theTerm==null || theTerm==""){
					$("#theTermCheck").removeAttr("class").attr("class","err_tips").html("转让时长不能为空");
					flag=false;
				}else if(!termRe.test(theTerm)){
					$("#theTermCheck").removeAttr("class").attr("class","err_tips").html("转让时长输入有误");
					flag=false;
				}else if(parseInt(theTerm)  > parseInt(cancelDate)){
					$("#theTermCheck").removeAttr("class").attr("class","err_tips").html("转让时长不能超过最长有效期");
					flag=false;
				}else{
					$("#theTermCheck").removeAttr("class").html("");
				}
				
			}
			if(i==1 || i>10){
				if(intoMoney==null || intoMoney==""){
					$("#intoMoneyCheck").removeAttr("class").attr("class","err_tips").html("转出金额不能为空");
					flag=false;
				}else if(!re.test(intoMoney)){
					$("#intoMoneyCheck").removeAttr("class").attr("class","err_tips").html("金额请输入正确的数字,只能保留两位小数");
					flag=false;
				}else if(minMoney>parseFloat(intoMoney)){
					$("#intoMoneyCheck").removeAttr("class").attr("class","err_tips").html("转让本金必须大于"+minMoney+"元");
					flag=false;
				}else if(parseInt(sureMoney==null?0:sureMoney) < parseInt(intoMoney==null?0:intoMoney)){
					$("#intoMoneyCheck").removeAttr("class").attr("class","err_tips").html("转让本金超出可转让本金");
					flag=false;
				}else{
					$("#intoMoneyCheck").removeAttr("class").html("");
				}
				if(flag){
					if(transferPrice==null || transferPrice==""){
						$("#transferPriceCheck").removeAttr("class").attr("class","err_tips").html("转让价不能为空");
						flag=false;
					}else if(!re.test(transferPrice)){
						$("#transferPriceCheck").removeAttr("class").attr("class","err_tips").html("转让价请输入正确的数字,只能保留两位小数");
						flag=false;
					}else if((intoMoney-transferPrice) >floatMoney || transferPrice > (parseFloat(intoMoney)+parseFloat(floatMoney))){
						$("#transferPriceCheck").removeAttr("class").attr("class","err_tips").html("转让价必须在浮动金额内");
						flag=false;
					}else{
						$("#transferPriceCheck").removeAttr("class").html("");
					}
					
				}
			}
			if(i==2 || i>10){
				var payPwd = $("#payPwd").val();
				if(payPwd==null || payPwd==""){
					$("#payPwdCheck").removeAttr("class").attr("class","err_tips").html("支付密码不能为空");
					flag=false;
				}else if(payPwd.length<8 || payPwd.length>16){
					$("#payPwdCheck").removeAttr("class").attr("class","err_tips").html("支付密码必须8到16位");
					flag=false;
				}else{
					$("#payPwdCheck").removeAttr("class").html("");
				}
			}
				
			return flag;
		}
		
		
		function saveHkbProjectdefTransfer(){
			var flag =blurCheck(11);
			if(flag){
				if (this.ajaxRequest_ != undefined && this.ajaxRequest_.readyState < 4) {
			        return;
				}else{
					var tmpPayPwd = $("#payPwd").val();
					var payPwd =rsaData($("#payPwd").val());
					this.ajaxRequest_=$.ajax({
				     type: "POST",
				     url:'<s:url value="/account/aipPlanAction_saveHkbProjectdefTransfer.action"/>',
				     data: {hkbInvestId:$("#hkbInvestId").val(), bargainorAmount:$("#intoMoney").val().replace(/\s/g, ""), bargainorPrice:$("#transferPrice").val().replace(/\s/g, ""), validateDays:$("#theTerm").val(),payPwd:payPwd},
				     dataType: "json",
				   	 success: function(data){
				   	 	var msg= data.msg;
				   	 	if(msg=="error"){
				   	 		$("#payPwd").val(tmpPayPwd);
				   	 		layer.alert("操作失败!",8);
				   	 		$('.close').click();
				   	 	}else if(msg=="success"){
				   	 		layer.alert("操作成功!",9);
				   	 		$('.close').click();
				   	 	}else{
				   	 		$("#payPwd").val(tmpPayPwd);
				   	 		layer.alert(msg,8);
				   	 		return;
				   	 	}
				   	 	toAccountPage(1,1);
				   	 	toAccountPage(1,2);
				     }
					});
				}
			}
		}
    </script>
</html>
